Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/snap, daemon, overlord/snapstate: tests and fixes for "snap refresh" of a classic snap #2612

Merged
merged 3 commits into from Jan 11, 2017

Conversation

chipaca
Copy link
Contributor

@chipaca chipaca commented Jan 11, 2017

No description provided.

Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! One question inline.

@@ -520,6 +520,11 @@ func Update(st *state.State, name, channel string, revision snap.Revision, userI
channel = snapst.Channel
}

if !flags.JailMode {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a test for this as well?

@@ -520,6 +520,11 @@ func Update(st *state.State, name, channel string, revision snap.Revision, userI
channel = snapst.Channel
}

if !flags.JailMode {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this tested? also seems obscure tbh, it will not be marked classic but it will be marked jailmode

c.Assert(err, IsNil)
c.Check(snapsup.Flags.Classic, Equals, true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort of feel a test where we actually run the tasks and look also at final snapstate would be even better

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be clear I think such a test would show the problem @mvo5 hit, these were passing anyway

@pedronis pedronis added this to the 2.21 milestone Jan 11, 2017
@@ -520,6 +520,11 @@ func Update(st *state.State, name, channel string, revision snap.Revision, userI
channel = snapst.Channel
}

if !(flags.JailMode || flags.DevMode) {
// adding a mode flag means add them all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the comment, the code seems ok without

Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@mvo5 mvo5 merged commit 9279611 into snapcore:master Jan 11, 2017
@chipaca chipaca deleted the refresh-classic branch January 20, 2017 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants